import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // {
    //   path: '/',
    //   name: 'home',
    //   component: HomeView,
    // },
    // {
    //   path: '/about',
    //   name: 'about',
    //   // route level code-splitting
    //   // this generates a separate chunk (About.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import('../views/AboutView.vue'),
    // },
    {
      path: '/',
      name: 'Login',
      component: () => import('../views/Login.vue'),
    },
    {
      path: '/HomePage',
      name: 'HomePage',
      component: () => import('../views/HomePage.vue'),
      children: [
        {
          path: '/OnePages',
          name: 'OnePages',
          component: () => import('../views/OnePages.vue'),
        },
        {
          path: '/User',
          name: 'User',
          component: () => import('../views/PermissionPage/User.vue'),
        },
        {
          path: '/Permission',
          name: 'Permission',
          component: () => import('../views/PermissionPage/Permission.vue'),
        },
        {
          path: '/Role',
          name: 'Role',
          component: () => import('../views/PermissionPage/Role.vue'),
        },
        {
          path: '/UserInfo',
          name: 'UserInfo',
          component: () => import('../views/PermissionPage/UserInfo.vue'),
        },
        {
          path: '/SheepFarm',
          name: 'SheepFarm',
          component: () => import('../views/SheepPage.vue/SheepFarm.vue'),
        },
        {
          path: '/PoultryHouse',
          name: 'PoultryHouse',
          component: () => import('../views/SheepPage.vue/PoultryHouse.vue'),
        },
        {
          path: '/Ewemating',
          name: 'Ewemating',
          component: () => import('../views/Ewe/EwematingView.vue'),
        },
        {
          path: '/Ewemating/:id',
          name: 'EwematingEdit',
          component: () => import('../views/Ewe/EwematingView.vue'),
        },
        {
          path: '/EwematingList',
          name: 'EwematingList',
          component: () => import('../views/EweList/EwematingListView.vue'),
        },
        {
          path: '/EwePregnancy',
          name: 'EwePregnancy',
          component: () => import('../views/Ewe/EwePregnancyView.vue'),
        },
        {
          path: '/EwePregnancyList',
          name: 'EwePregnancyList',
          component: () => import('../views/EweList/EwePregnancyListView.vue'),
        },
        {
          path: '/EweEwedelivery',
          name: 'EweEwedelivery',
          component: () => import('../views/Ewe/EweEwedeliveryView.vue'),
        },
        {
          path: '/EweEwedeliveryList',
          name: 'EweEwedeliveryList',
          component: () => import('../views/EweList/EweEwedeliveryListView.vue'),
        },
        {
          path: '/EweWeaning',
          name: 'EweWeaning',
          component: () => import('../views/Ewe/EweWeaningView.vue'),
        },
        {
          path: '/EweWeaningList',
          name: 'EweWeaningList',
          component: () => import('../views/EweList/EweWeaningListView.vue'),
        },
        {
          path: '/Death',
          name: 'Death',
          component: () => import('../views/Purchasing/Death.vue'),
        },
        {
          path: '/DeathList',
          name: 'DeathList',
          component: () => import('../views/Purchasing/DeathList.vue'),
        },
        {
          path: '/EliminateList',
          name: 'EliminateList',
          component: () => import('../views/Purchasing/EliminateList.vue'),
        },
        {
          path: '/Change',
          name: 'Change',
          component: () => import('../views/Purchasing/Change.vue'),
        },
        {
          path: '/ProcurementList',
          name: 'ProcurementList',
          component: () => import('../views/Purchasing/ProcurementList.vue'),
        },
        {
          path: '/SalesList',
          name: 'SalesList',
          component: () => import('../views/Purchasing/SalesList.vue'),
        },
        {
          path: '/Purchase',
          name: 'Purchase',
          component: () => import('../views/Purchasing/Purchase.vue'),
        },
        {
          path: '/All',
          name: 'All',
          component: () => import('../views/Purchasing/All.vue'),
        },
        {
          path: '/Sale',
          name: 'Sale',
          component: () => import('../views/Purchasing/Sale.vue'),
        },
        {
          path: '/descendant-creation',
          name: 'descendant-creation',
          component: () => import('../views/Hqx/DescendantFromView.vue'),
        },
        {
          path: '/descendant-list',
          name: 'descendant-records',
          component: () => import('../views/Hqx/DescendantListView.vue'),
        },
        {
          path: '/livestock-edit/:id',
          name: 'livestock-edit',
          component: () => import('../views/Hqx/LivestockEditView.vue'),
        },
        {
          path: '/livestock-form',
          name: 'livestock-creation',
          component: () => import('../views/Hqx/LivestockFromView.vue'),
        },
        {
          path: '/livestock-list',
          name: 'livestock-records',
          component: () => import('../views/Hqx/LivestockListView.vue'),
        },
        {
          path: '/ram-edit/:id',
          name: 'ram-edit',
          component: () => import('../views/Hqx/RamEditView.vue'),
        },
        {
          path: '/ram-form',
          name: 'ram-form',
          component: () => import('../views/Hqx/RamFormView.vue'),
        },
        {
          path: '/ram-list',
          name: 'ram-records',
          component: () => import('../views/Hqx/RamListView.vue'),
        },
        {
          path: '/descendant-edit/:id',
          name: 'descendant-edit',
          component: () => import('../views/Hqx/DescendantEditView.vue'),
        },
        {
          path: '/table-design',
          name: 'table-design',
          component: () => import('../views/Hqx/tableDesign/RamInitialView.vue'),
        },
        {
          path: '/transfer',
          name: 'transfer',
          component: () => import('../views/Hqx/tableDesign/EweInitialView.vue'),
        },
        {
          path: '/descendant-initial',
          name: 'descendant-initial',
          component: () => import('../views/Hqx/tableDesign/DescendantInitialView.vue'),
        },
        {
          path: '/ram-initial-list',
          name: 'ram-initial-list',
          component: () => import('../views/Hqx/tableDesign/RamInitialList.vue'),
        },
        {
          path: '/ewe-initial-list',
          name: 'ewe-initial-list',
          component: () => import('../views/Hqx/tableDesign/EweInitialList.vue'),
        },
        {
          path: '/descendant-initial-list',
          name: 'descendant-initial-list',
          component: () => import('../views/Hqx/tableDesign/DescendantInitialList.vue'),
        },
        {
          path: '/ewe-history',
          name: 'ewe-history',
          component: () => import('../views/Hqx/tableDesign/EweHistoryView.vue'),
        },
        {
          path: '/NotificationPage',
          name: 'NotificationPage',
          component: () => import('../views/NotificationPage.vue'),
        },
      ]
    },
  ],
})

export default router
